﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ConfigDataSource.aspx.cs" Inherits="DQYT.HTDZ.Web.Views.SJCJDB.ConfigDataSource" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <%--<LINK href="../../common/CSS/main.css" type="text/css" rel="stylesheet">--%>
    <link href="../../Common/CSS/Default.css" rel="stylesheet" type="text/css" />
    <%--<script  type="text/javascript" src="../../Common/JS/calendar.js"></script>--%>
    <%--<script type="text/javascript" src="../../Common/JS/changerows.js"></script>--%>
    <style type="text/css">
        .input1
        {}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div align="center">
            &nbsp;<asp:Wizard 
                ID="Wizard1" runat="server" ActiveStepIndex="0" Height="462px"
                Width="600px" CancelButtonType="Link" FinishCompleteButtonText="" 
                FinishCompleteButtonType="Link" FinishPreviousButtonText="" 
                FinishPreviousButtonType="Link" StartNextButtonText="" 
                StartNextButtonType="Link" StepNextButtonText="" StepNextButtonType="Link" 
                StepPreviousButtonText="" StepPreviousButtonType="Link" CancelButtonText="" 
                DisplaySideBar="False">
                <WizardSteps>
                    <asp:WizardStep ID="WizardStep1" runat="server" StepType="Start" EnableTheming="True">
                        <table height="99%" width="99%" border="1" cellpadding="1" cellspacing="1">
                            <tr>
                                <td align="center" colspan="2" height="30">
                                    【<asp:Label ID="Label100" runat="server" Text="选择数据源"></asp:Label>
                                    】</td>
                            </tr>
                            <tr>
                                <td align="right" bgcolor="#ecf9fc" width="250">
                                    <asp:Label ID="Label1" runat="server" Text="数据源类型："></asp:Label>
                                </td>
                                <td class="right_bg" align="left" >
                                    <asp:DropDownList ID="ddlDBSource" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlDBSource_SelectedIndexChanged"
                                        Width="200px">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" bgcolor="#ecf9fc" width="250">
                                    <asp:Label ID="Label2" runat="server" Text="主机名："></asp:Label>
                                    </td>
                                <td class="right_bg" align="left" >
                                    <asp:TextBox ID="txtHostName" runat="server" Width="200px" CssClass="input1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" bgcolor="#ecf9fc" width="250">
                                    <asp:Label ID="Label3" runat="server" Text="端口号："></asp:Label>
                                    </td>
                                <td class="right_bg" align="left" >
                                    <asp:TextBox ID="txtProt" runat="server" Width="200px" CssClass="input1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" bgcolor="#ecf9fc" width="250">
                                    <asp:Label ID="Label4" runat="server" Text="数据库实例名："></asp:Label>
                                    </td>
                                <td class="right_bg" align="left" >
                                    <asp:TextBox ID="txtDBName" runat="server" Width="200px" CssClass="input1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" bgcolor="#ecf9fc" width="250">
                                    <asp:Label ID="Label5" runat="server" Text="用户名："></asp:Label>
                                    </td>
                                <td class="right_bg" align="left" >
                                    <asp:TextBox ID="txtUserName" runat="server" Width="200px" CssClass="input1"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" bgcolor="#ecf9fc" width="250">
                                    <asp:Label ID="Label6" runat="server" Text="密 码："></asp:Label>
                                </td>
                                <td class="right_bg" align="left" >
                                    <asp:TextBox ID="txtPassWord" runat="server" TextMode="Password" Width="200px" 
                                        CssClass="input1" OnTextChanged="txtPassWord_TextChanged"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td align="right" bgcolor="#ecf9fc" width="250">
                                    <asp:Label ID="Label7" runat="server" Text="文 件："></asp:Label>
                                </td>
                                <td class="right_bg" align="left" >
                                    <asp:FileUpload ID="fulFileUpload" runat="server" Enabled="False" Width="220px" 
                                        CssClass="input1" />
                                    <asp:HiddenField ID="hfdUploadFile" runat="server" Visible="False" 
                                        OnValueChanged="hfdUploadFile_ValueChanged" />
                                </td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2" style="height: 43px" class="right_bg">
                        <asp:Button ID="btnLoadDBConfig" runat="server" Text="加载上次数据库配置" OnClick="btnLoadDBConfig_Click" CssClass="submit" />
                        <asp:Button ID="btnNext1" runat="server" OnClick="btnNext1_Click" Text="下一步" CssClass="submit" />
                                </td>
                            </tr>
                        </table>
                        &nbsp;
                    </asp:WizardStep>
                    <asp:WizardStep ID="WizardStep2" runat="server" StepType="Step" EnableTheming="True">
                        <table style="width: 98%" height ="100%" border="1" cellpadding="1" cellspacing="1">
                            <tr>
                                <td align="left" bgcolor="#ecf9fc">
                                    &nbsp;选择数据表：</td>
                                <td align="left" style="width: 395px" class="right_bg">
                                    <asp:DropDownList ID="ddlDBTable" runat="server"
                                        Width="200px">
                                    </asp:DropDownList>
                                    <asp:Button ID="btnLoadGridView" runat="server" OnClick="btnLoadGridView_Click" Text="加载数据" CssClass="submit" />
                                    <asp:Button ID="btnNoMatchField" runat="server" CssClass="submit" OnClick="btnNoMatchField_Click"
                                        Text="不匹配字段" />
                                    &nbsp;
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"  width="100%" style="height: 341px" class="right_bg">
                                    <asp:Panel ID="plMatchField" runat="server" Height="100%" Width="98%" ScrollBars="Vertical">
                                    
                                    <asp:GridView ID="gvwDataTable" runat="server"
                                        Width="99%" AutoGenerateColumns="False" OnRowDataBound="gvwDataTable_RowDataBound" OnDataBound="gvwDataTable_DataBound" CssClass="gridview">
                                        <AlternatingRowStyle CssClass="gridEvenRow" />
                                        <Columns>
                                            <asp:BoundField DataField="TABLE_ID" HeaderText="表ID" Visible="False" />
                                            <asp:BoundField DataField="FIELD_CODE" HeaderText="字段代码" />
                                            <asp:BoundField DataField="FIELD_NAME" HeaderText="字段名称" />
                                            <asp:BoundField DataField="FIELD_TYPE" HeaderText="字段类型" >
                                                <HeaderStyle Width="80px" />
                                                <ItemStyle HorizontalAlign="Center" Width="80px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="FIELD_NULL" HeaderText="为空" >
                                                <HeaderStyle Width="40px" />
                                                <ItemStyle HorizontalAlign="Center" Width="40px" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="FIELD_KEY" HeaderText="主键">
                                                <HeaderStyle Width="40px" />
                                                <ItemStyle Width="40px" />
                                            </asp:BoundField>
                                            <asp:TemplateField HeaderText="本地表字段">
                                                <ItemTemplate>
                                                    <asp:DropDownList ID="DropDownList1" runat="server" Width="104px">
                                                    </asp:DropDownList>
                                                </ItemTemplate>
                                                <HeaderStyle Width="100px" />
                                                <ItemStyle HorizontalAlign="Center" Width="100px" />
                                            </asp:TemplateField>
                                        </Columns>
                                        <FooterStyle CssClass="gridFooter" />
                                        <HeaderStyle CssClass="gridHead" Height="25px" />
                                        <RowStyle CssClass="gridOddRow" Height="20px" />
                                        <SelectedRowStyle CssClass="gridSelectedHighlight" />
                                    </asp:GridView>
                                    </asp:Panel>
                                    <asp:Panel ID="plNoMatchField" runat="server" Height="100%" ScrollBars="Vertical"
                                        Visible="False" Width="97%">
                                        <asp:GridView ID="gvwField" runat="server" AutoGenerateColumns="False" CssClass="gridview"
                                            Width="100%">
                                            <Columns>
                                                <asp:BoundField HeaderText="服务器表字段" DataField="ServerField" />
                                                <asp:BoundField HeaderText="字段值" DataField="ServerFieldNum" />
                                                <asp:BoundField HeaderText="本地表字段" DataField="ClientField" />
                                                <asp:BoundField HeaderText="字段值" DataField="ClientFieldNum" />
                                            </Columns>
                                        </asp:GridView>
                                        <asp:Button ID="btnBack" runat="server" CssClass="submit" OnClick="btnBack_Click"
                                            Text=" 返 回 " />
                                        <asp:Button ID="btnDownloadField" runat="server" CssClass="submit" Text=" 下 载 " OnClick="btnDownloadField_Click" />
                                    </asp:Panel>
                                  
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"  width="100%" style="height: 30px" align="center" class="right_bg">
                        <asp:Button ID="btnLoadFieldConfig" runat="server" Text="加载字段配置文件" OnClick="btnLoadFieldConfig_Click" Enabled="False" CssClass="submit" />
                        <asp:Button ID="btnSaveConfig" runat="server" OnClick="btnSaveConfig_Click" Text="保存配置文件" Enabled="False" CssClass="submit" />
                        <asp:Button ID="btnPrevious2" runat="server" OnClick="btnPrevious2_Click" Text="上一步" CssClass="submit" />
                        <asp:Button ID="btnNext2" runat="server" OnClick="btnNext2_Click" Text="下一步" Enabled="False" CssClass="submit" />
                                </td>
                            </tr>
                        </table>
                    </asp:WizardStep>
                    <asp:WizardStep ID="WizardStep3" runat="server" StepType="Finish" EnableTheming="True">
                        <table style="width: 99%; height: 99%" border="1" cellpadding="1" cellspacing="1">
                            <caption align="center" class="right_bg">
                                【<asp:Label ID="Label9" runat="server" Text="筛选记录"></asp:Label>
                                】</caption>
                            <tr>
                                <td colspan="5" >
                                <div align="left" class="right_bg">
                                    <asp:RadioButtonList ID="radlDataFilter" runat="server" AutoPostBack="True" OnSelectedIndexChanged="radlDataFilter_SelectedIndexChanged"
                                        RepeatDirection="Horizontal">
                                        <asp:ListItem Selected="True">追加全部</asp:ListItem>
                                        <asp:ListItem>数据筛选</asp:ListItem>
                                    </asp:RadioButtonList>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 144px" class="r_bg">
                                    <asp:CheckBox ID="chkWellNo" runat="server" Text="井号" OnCheckedChanged="chkWellNo_CheckedChanged" AutoPostBack="True" />
                                </td>
                                <td style="width: 100px" class="right_bg">
                                    <asp:DropDownList ID="ddlWellNo" runat="server" Width="80px">
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 100px" class="right_bg">
                                    <asp:DropDownList ID="ddlWellOpera" runat="server" Width="80px">
                                        <asp:ListItem Selected="True">like</asp:ListItem>
                                        <asp:ListItem>=</asp:ListItem>
                                        <asp:ListItem>in</asp:ListItem>
                                        <asp:ListItem>not in</asp:ListItem>
                                        <asp:ListItem>!=</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 84px" class="right_bg">
                                    <asp:TextBox ID="txtWell" runat="server" Width="80px" CssClass="input1"></asp:TextBox>
                                </td>
                                <td style="width: 100px" class="right_bg">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 144px; " class="r_bg">
                                    <asp:CheckBox ID="chkLoadDate" runat="server" Text="加载日期" OnCheckedChanged="chkLoadDate_CheckedChanged" AutoPostBack="True" />
                                </td>
                                <td style="width: 100px; " class="right_bg">
                                    <asp:DropDownList ID="ddlLoadDate" runat="server" Width="80px">
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 100px; " class="right_bg">
                                    <asp:TextBox ID="txtBeginDate" runat="server" onfocus="calendar()" Width="75px" CssClass="input1"></asp:TextBox>
                                </td>
                                <td style="width: 84px; " class="right_bg">
                                    <asp:TextBox ID="txtEndDate" runat="server" onfocus="calendar()" Width="80px" CssClass="input1"></asp:TextBox>
                                </td>
                                <td style="width: 100px; " class="right_bg">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 144px" class="r_bg">
                                    <asp:CheckBox ID="chkCustom" runat="server" Text="自定义" OnCheckedChanged="chkCustom_CheckedChanged" AutoPostBack="True" />
                                </td>
                                <td style="width: 100px" class="right_bg">
                                    <asp:DropDownList ID="ddlFieldName" runat="server" Width="80px">
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 100px" class="right_bg">
                                    <asp:DropDownList ID="ddlFieldOpera" runat="server" Width="80px">
                                        <asp:ListItem Selected="True">like</asp:ListItem>
                                        <asp:ListItem>&gt;</asp:ListItem>
                                        <asp:ListItem>&gt;=</asp:ListItem>
                                        <asp:ListItem>=</asp:ListItem>
                                        <asp:ListItem>&lt;=</asp:ListItem>
                                        <asp:ListItem>&lt;</asp:ListItem>
                                        <asp:ListItem>in</asp:ListItem>
                                        <asp:ListItem>not in</asp:ListItem>
                                        <asp:ListItem>!=</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td style="width: 84px" class="right_bg">
                                    <asp:TextBox ID="txtFieldValue" runat="server" Width="80px" CssClass="input1"></asp:TextBox>
                                </td>
                                <td style="width: 100px" class="right_bg">
                                    <asp:Button ID="btnAddSQL" runat="server" Text="添加" OnClick="btnAddSQL_Click" CssClass="submit" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5" class="right_bg">
                                    <asp:Button ID="btnMakeSQL" runat="server" Text="生成查询语句" OnClick="btnMakeSQL_Click" CssClass="submit" />
                                    <asp:Button ID="btnClear" runat="server" Text=" 清 除 " OnClick="btnClear_Click" CssClass="submit" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="5" class="right_bg">
                                    <asp:TextBox ID="txtMakeSQL" runat="server" Height="200px" ReadOnly="True" TextMode="MultiLine"
                                        Width="550px" CssClass="input1"></asp:TextBox>
                                </td>
                            </tr> 
                            <tr>
                                <td colspan="5" align="center" class="right_bg">
                                    &nbsp;<asp:Button ID="btnPrevious3" runat="server" OnClick="btnPrevious3_Click" Text="上一步" CssClass="submit" />
                        <asp:Button ID="btnAccomplish" runat="server" Text=" 完 成 " OnClick="btnAccomplish_Click" Enabled="False" CssClass="submit" />
                                </td>
                            </tr>
                        </table>
                        &nbsp;
                    </asp:WizardStep>
                </WizardSteps>
            </asp:Wizard>
        </div>
    
    </div>
    </form>
</body>
</html>
<%--<script language="javascript"><!--
        //senfe("表格名称","奇数行背景","偶数行背景","鼠标经过背景","点击后背景");
        senfe("gvwDataTable","#ECF9FC","#FFFFFF","#D6F1F8");
    --></script>--%>
